{% regroup logList|dictsort:"IP" by IP as log %}
<div>
  {% for IP in log %}
  <h2>{{ IP.grouper }}</h2>
  <table cellspacing="2px" id="log-table" style="width: 100%; font-size: 10px; overflow: auto; text-align: center">
    <thead>
      <tr>
        {% for field in keys %}
        <th style="width: 80px; background: #eee;">{{field}}</th>
        {% endfor %}
      </tr>
    </thead>
    <tbody>
      {% for item in IP.list %}
      <tr style="background:{% cycle '' '#eee' %}">
        {% for key, value in item.items %}
        {% if key != "IP" %}
        <td style="width: 80px">{{value}}</td>
        {% endif %}
        {% endfor %}
      <tr/>
      {% endfor %}
    </tbody>
  </table>
  {% endfor %}
</div>
